<template>
<!-- 下方导航栏 -->
<div>
    <transition name="slide-up">
    <div class="menu-wrapper" :class="{'hide-box-shadow': !menuVisible || settingVisible >= 0 }" v-show="menuVisible">
      <div class="icon-wrapper" @click="showSetting(3)">
        <span class="icon-toggle"></span>
      </div>
      <div class="icon-wrapper" @click="showSetting(2)">
        <span class="icon-yuan"></span>
      </div>
      <div class="icon-wrapper" @click="showSetting(1)">
        <span class="icon-taiyang"></span>
      </div>
      <div class="icon-wrapper" @click="showSetting(0)">
        <span class="icon-A"></span>
      </div>
    </div>
  </transition>
  <ebook-setting-font></ebook-setting-font>
  <ebook-setting-font-popup></ebook-setting-font-popup>
</div>
</template>

<script>
// 引入字体大小设置组件 EbookSettingFont
import EbookSettingFont from './EbookSettingFont'
import { ebookMixin } from '../../utils/mixin'
import EbookSettingFontPopup from './EbookSettingFontPopup';

export default {
    components: {
      EbookSettingFont,
      EbookSettingFontPopup
    },
    mixins: [ebookMixin],
    methods: {
        showSetting(key){
            console.log(key);
            // console.log(this.settingVisible);
            this.setSettingVisible(key)
        }
    }
}
</script>

<style lang="scss" scoped>
@import '../../assets/styles/global.scss';
  .menu-wrapper {
    position: absolute;
    bottom: 0;
    left: 0;
    z-index: 102;
    display: flex;
    width: 100%;
    height: px2rem(48);
    background: white;
    box-shadow: 0 px2rem(-8) px2rem(8) rgba(0, 0, 0, .15);
    font-size: px2rem(20);
    &.hide-box-shadow {
      box-shadow: none;
    }
    .icon-wrapper {
      flex: 1;
      @include center;
      .icon-progress {
        font-size: px2rem(28);
      }
      .icon-bright {
        font-size: px2rem(24);
      }
      .icon-A {
        padding-bottom: 2px;
      }
    }
  }
</style>